import { t } from '@src/locales'
export const translateAction = (action: string) => {
	let actionDes = t(`common.record.action['${action}']`) || action;
	try {
		if (action.includes('通过会话') && action.includes('新建')) {
			const num: any = action.replace('通过会话', '').replace('新建', '');
			actionDes = t('common.record.action.createByApi', { data1: num })
		}
	} catch (error) {
		console.warn(error, 'error try catch createByApi');
	}
	return actionDes
}